# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=mpg123
pkgver=1.26.3
pkgrel=0
pkgdesc="Console-based MPEG Audio Player for Layers 1, 2 and 3"
url="http://www.mpg123.org"
arch="all"
license="LGPL-2.1-only"
subpackages="$pkgname-libs $pkgname-dev $pkgname-doc"
makedepends="libtool alsa-lib-dev linux-headers"
source="http://www.mpg123.org/download/mpg123-$pkgver.tar.bz2"
options="libtool"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--disable-dependency-tracking \
		--with-pic \
		--with-optimization=0 \
		--with-cpu=i386_fpu \
		--with-audio="alsa oss"
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="7574331afaecf3f867455df4b7012e90686ad6ac8c5b5e820244204ea7088bf2b02c3e75f53fe71c205f9eca81fef93f1d969c8d0d1ee9775dc05482290f7b2d  mpg123-1.26.3.tar.bz2"
